<template>
  <section class="section">
    <header class="header">
      <div class="left">
        <img class="img" src="@/assets/images/医疗.png"  alt="" /><span
          class="title"
          >紧急医疗调度指挥系统</span
        >
      </div>
      <div class="right">
         <span>{{ date }} 某某市120指挥系统</span>
         <img src="@/assets/images/logout.png" width="20" height="20" alt="" @click="logout">
      </div>
    </header>
    <div class="button-group">
      <el-button type="primary">操作系统</el-button>
      <el-button type="primary" @click="toGps">调度管理</el-button>
      <el-button type="primary">通话管理</el-button>
      <el-button type="primary">短信管理</el-button>
      <el-button type="primary">重症管理</el-button>
      <el-button type="primary">车载记录</el-button>
      <el-button type="primary">知识库管理</el-button>
      <el-button type="primary">车载通讯</el-button>
      <el-button type="primary">辅助平台</el-button>
      <el-button type="primary">帮助</el-button>
    </div>
    <main>
      <CallLog></CallLog>
      <EventCar></EventCar>
    </main>
  </section>
</template>
<script>
import { parseTime } from "@/utils/ruoyi.js";
import CallLog from "./components/callLog";
import EventCar from "./components/eventCar";
export default {
  components: {
    CallLog,
    EventCar,
  },
  data() {
    return {
      date: "",
    };
  },
  computed: {},
  mounted() {
    this.$nextTick(() => {
      this.date = parseTime(new Date());
    });
  },
  methods: {
    toGps() {
      const routeUrl = this.$router.resolve({
        path: "/gpsAnalysis",
        //query: { id: 96 },
      });
      window.open(routeUrl.href, "_blank");
    },
    logout(){
      this.$router.replace('login')
    }
  },
};
</script>
<style scoped lang='scss'>
.section {
  background: #f5f5f5;
  height: 100%;
  .header {
    display: flex;
    .left {
      padding: 0 20px;
      flex: 2;
      height: 40px;
      line-height: 40px;
      color: white;
      font-weight: bold;
      background: #3b403a;
      position: relative;
      &::after {
        content: "";
        width: 0;
        height: 0;
        right: 0px;
        border: 20px #3b403a solid;
        border-right-color: #00b384;
        border-bottom-color: #00b384;
        position: absolute;
      }
      .img {
        margin-right: 15px;
        padding: 3px;
        background: #fdfc00;
        border-radius: 50%;
      }
      .title {
        vertical-align: top;
        font-size: 20px;
      }
    }
    .right {
      flex: 1;
      height: 40px;
      background: #00b384;
      line-height: 40px;
      color: white;
      text-align: center;
      span{
        //position: absolute;
      }
      img{
        //position: absolute;
        margin-left: 300px;
        vertical-align: sub;
        &:hover{
          cursor: pointer;
        }
      }
    }
  }
  .button-group {
    height: 50px;
    box-sizing: border-box;
    padding-left: 5px;
    padding-top: 5px;
    padding-bottom: 20px;
    ::v-deep .el-button {
      padding: 5px 10px;
      margin-right: 40px;
    }
  }
  main {
    .asd {
      height: calc((100vh - 90px) / 2);
    }
  }
}
</style>
